package com.itcast.user.feign.fallback;

import com.itcast.common.UserOrderDTO;

import com.itcast.user.feign.OrderFeign;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description:  Feign fallback
 * @Version: V1.0
 */
@Component
public class OrderFeignFallback implements OrderFeign {


    @Override
    public List<UserOrderDTO> getOrders(String username) {

        List<UserOrderDTO> list = new ArrayList<>();
        list.add(new UserOrderDTO().setUsername(username).setId("-1"));
        return list;
    }
}
